﻿using System.Modules.Constants;

namespace System.Modules.SharePoint.Constants
{
    /// <summary>
    /// Hosts Constants to SP Query Templates.
    /// </summary>
    public class SPQueryTemplates : XmlTemplates
    {
        /// <summary>
        /// SP Site Data Query Lists
        /// </summary>
        public const string SP_SITE_DATA_QUERY_LISTS = "<Lists{0}>{1}</Lists>";

        /// <summary>
        /// SP Site Data Query WithIndex
        /// </summary>
        public const string SP_SITE_DATA_QUERY_WITH_INDEX = "<WithIndex FieldId='{0}' Type='{1}' Value='{2}' />";

        /// <summary>
        /// SP Site Data Query WithIndex
        /// </summary>
        public const string SP_SITE_DATA_QUERY_LIST = "<List ID='{0}' />";

        /// <summary>
        /// Field Ref Template without Lookup Id attribute
        /// </summary>
        public const string FIELD_REF = "<FieldRef {0}/>";

        /// <summary>
        /// Value Template
        /// </summary>
        public const string VALUE = "<Value {0}>{1}</Value>";

        /// <summary>
        /// AND Template
        /// </summary>
        public const string AND = "<And>{0}{1}</And>";

        /// <summary>
        /// OR Template
        /// </summary>
        public const string OR = "<Or>{0}{1}</Or>";

        /// <summary>
        /// Where Template
        /// </summary>
        public const string DATE_RANGES_OVERLAP = "<DateRangesOverlap>{0}</DateRangesOverlap>";

        /// <summary>
        /// Where Template
        /// </summary>
        public const string WHERE = "<Where>{0}</Where>";

        /// <summary>
        /// Order By Template
        /// </summary>
        public const string ORDER_BY = "<OrderBy>{0}</OrderBy>";

        /// <summary>
        /// List Property
        /// </summary>
        public const string LIST_PROPERTY = "<ListProperty Name='{0}' />";

        /// <summary>
        /// Project Property
        /// </summary>
        public const string PROJECT_PROPERTY = "<ProjectProperty Name='{0}' />";
    }
}
